package org.openrbac.rbac.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.openrbac.rbac.entity.Product;
import org.openrbac.rbac.service.ProductService;
import org.openrbac.rbac.mapper.ProductMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 梁富贵
* @description 针对表【product】的数据库操作Service实现
* @createDate 2024-05-15 20:45:59
*/
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product>
    implements ProductService{

    @Override
    public List<Product> getRecommands() {
        return this.baseMapper.getRecommandGoods();
    }

    @Override
    public List<Product> getGoods(List<Integer> ids) {
        return this.baseMapper.getProducts(ids);
    }

    @Override
    public List<Integer> getRecommandIds(String type) {
        return  this.baseMapper.getRecommandGoodsIds(type);
    }

    @Override
    public List<Integer> getImageIds(String type) {
        return this.baseMapper.getRecommandImageIds(type);
    }


}




